package com.example.commons.response;

import com.alibaba.fastjson.JSONObject;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 统一返回格式
 */
@Data
@NoArgsConstructor
public class ResponseResult {

    static  final  int SUCCESS =200;

    static  final  int ERROR =500;

    private int code;

    private String msg;

    private Object data;

    public ResponseResult(int code, String msg, Object data) {
        this.code = SUCCESS;
        this.msg = msg;
        this.data =  data;
    }


    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
